<template>
  <XtxBread v-if="goodsData.categories">
    <XtxBreadItem to="/">首页</XtxBreadItem>
    <XtxBreadItem :to="'/category/' + goodsData.categories[1].id">{{
      goodsData.categories[1].name
    }}</XtxBreadItem>
    <XtxBreadItem :to="'/category/sub/' + goodsData.categories[0].id">{{
      goodsData.categories[0].name
    }}</XtxBreadItem>
    <XtxBreadItem>{{ goodsData.name }}</XtxBreadItem>
  </XtxBread>
</template>
<script>
export default {
  name: 'GoodsBread',
  props: {
    goodsData: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>
